' ++++++++++++++++++++++++++++ Klasa Apartment ++++++++++++++++++++++++
Public Class Apartment
  Inherits Building

  Private mUnits As Integer    ' Liczba mieszka
  Private mRent As Double      ' Cena najmu na jednostk 
  Private mOccupRate As Double ' Wspczynnik zajcia dla budynku 
    
  ' ==================== Waciwoci ======================

  Public Property Units() As Integer   ' Liczba mieszka
    Get
      Return mUnits
    End Get
    Set(ByVal Value As Integer)
      mUnits = Value
    End Set
  End Property

  Public Property Rents() As Double   ' Cena najmu 
    Get
      Return mRent
    End Get
    Set(ByVal Value As Double)
      mRent = Value
    End Set
  End Property

  Public Property OccupancyRate() As Double ' Wspczynnik zajcia
    Get
      Return mOccupRate
    End Get
    Set(ByVal Value As Double)
      mOccupRate = Value
    End Set
  End Property

  ' ============== Metody ==================
    
  Public Sub DisplayBuilding() ' wywietla dane o budynku

    DisplayBaseInfo()
    Console.WriteLine("Liczba jednostek: " & mUnits)
    Console.WriteLine("Cena wynajmu na jednostk: " & FormatMoney(mRent))
    Console.WriteLine("Wspczynnik zajcia: " & mOccupRate)
  End Sub

End Class

' ++++++++++++++++++++++++ Klasa Commercial ++++++++++++++++++++++++

Public Class Commercial
  Inherits Building

  Private mSquareFeet As Integer  ' Powierzchnia do wynajcia w m kw.
  Private mRentPerSF As Double    ' Cena wynajmu za m kw. 
  Private mParking As Integer     ' Miejsca parkingowe

  ' ==================== Waciwoci ======================
    
  Public Property SquareFeet() As Integer  ' Metry kwadratowe
    Get
      Return mSquareFeet
    End Get
    Set(ByVal Value As Integer)
      mSquareFeet = Value
    End Set
  End Property

  Public Property RentPerSF() As Double   ' Cena najmu za m kw. 
    Get
      Return mRentPerSF
    End Get
    Set(ByVal Value As Double)
      mRentPerSF = Value
    End Set
  End Property

  Public Property ParkingSpots() As Integer ' Miejsca parkingowe
    Get
      Return mParking
    End Get
    Set(ByVal Value As Integer)
      mParking = Value
    End Set
  End Property

  ' ============== Metody ==================

  Public Sub DisplayBuilding()
    DisplayBaseInfo()        ' Wywoanie klasy bazowej
    Console.WriteLine("Metrw kwadratowych: " & mSquareFeet)
    Console.WriteLine("Cena za m2: " & FormatMoney(mRentPerSF))
    Console.WriteLine("Miejsca parkingowe: " & mParking)
  End Sub
End Class

' ++++++++++++++++++++++++++++ Klasa Home ++++++++++++++++++++++++++++

Public Class Home
  Inherits Building

  Private mSquareFeet As Integer    ' Powierzchnia domu
  Private mRentPerMonth As Double   ' Cena najmu za miesic 
  Private mBedrooms As Integer      ' Liczba sypialni
  Private mBaths As Integer         ' Liczba azienek

  ' ==================== Waciwoci ======================
    
  Public Property SquareFeet() As Integer   ' Powierzchnia domu
    Get
      Return mSquareFeet
    End Get
    Set(ByVal Value As Integer)
      mSquareFeet = Value
    End Set
  End Property

  Public Property Rent() As Double      ' Cena najmu
    Get
      Return mRentPerMonth
    End Get
    Set(ByVal Value As Double)
      mRentPerMonth = Value
    End Set
  End Property

  Public Property Bedrooms() As Integer     ' Sypialnie
    Get
      Return mBedrooms
    End Get
    Set(ByVal Value As Integer)
      mBedrooms = Value
    End Set
  End Property

  Public Property Baths() As Integer    ' azienki
    Get
      Return mBaths
    End Get
    Set(ByVal Value As Integer)
      mBaths = Value
    End Set
  End Property
  ' ============== Metody ==================
    
  Public Sub DisplayBuilding()

    DisplayBaseInfo()        ' Wywoanie klasy bazowej
    Console.WriteLine("Typ budynku: Dom")
    Console.WriteLine("Powierzchnia w m2: " & mSquareFeet)
    Console.WriteLine("Cena najmu za miesic: " & _
                       FormatMoney(mRentPerMonth))
    Console.WriteLine("Sypialnie: " & mBedrooms)
    Console.WriteLine("azienki: " & mBaths)
  End Sub

End Class
